$(document).ready(function(){
    var kyjgUrl = global.localhost+'Api/New/get_kyjg';
    sendAjax(kyjgUrl,function (res) {
        console.log(res);
        var html = '';
        for(var i=0;i<res.length;i++){
            html += '<div class="kyjg-items">';
            html += '<div class="kyjg-img" style="background: url('+res[i].img+') no-repeat center center/cover"></div>'
            html += '<div class="kyjg-intro">';
            html += '<p class="kyjg-title">'+res[i].title+'</p>';
            html += '<p class="kyjg-content">'+res[i].sub_content+'</p>';
            html += '</div>';
            html += '</div>';

        }
        $('.kyjg').html(html);
    })
    var expertUrl = global.localhost+"Api/New/get_ptzj";
    sendAjax(expertUrl,function (res) {
        console.log(res);
        var html = "";
        for(var i=0;i<res.length;i++){
            html += '<li>';
            html += ' <a href="">';
            html += '<div class="expert-pic" style="background: url('+res[i].title_img+') no-repeat center center/cover"></div>';
            html += '<div class="expert-infro">';
            html += '<div class="expert-name">'+res[i].title+'</div>';
            html += '<div class="expert-desc">'+res[i].content+'</div>';
            html += '</div>';
            html += '</a>';
            html += '</li>';
            // html += `
            // <li>
            //     <a href="">
            //         <div class="expert-pic" style="background: url(${res[i].title_img}) no-repeat center center/cover"></div>
            //         <div class="expert-infro">
            //             <div class="expert-name">${res[i].title}</div>
            //             <div class="expert-desc">
            //                 ${res[i].content}
            //             </div>
            //         </div>
            //     </a>
            // </li>
            // `
        }
        $(".expert-list ul").html(html);
    })
    var centerUrl = global.localhost+"Api/New/get_yfpt";
    sendAjax(centerUrl,function (res) {
        console.log(res);
        var html = "";
        for(var i=0;i<res.length;i++){
            html += '<li>';
            html += ' <a href="">';
            html += '<div class="expert-pic" style="background: url('+res[i].img+') no-repeat center center/cover"></div>';
            html += '<div class="expert-infro">';
            html += '<div class="expert-name">'+res[i].title+'</div>';
            html += '<div class="expert-desc">'+res[i].sub_content+'</div>';
            html += '</div>';
            html += '</a>';
            html += '</li>';
            // html += `
            // <li>
            //     <a href="">
            //         <div class="expert-pic" style="background: url(${res[i].img}) no-repeat center center/cover"></div>
            //         <div class="expert-infro">
            //             <div class="expert-name">${res[i].title}</div>
            //             <div class="expert-desc">
            //                 ${res[i].sub_content}
            //             </div>
            //         </div>
            //     </a>
            // </li>
            // `
        }
        $(".center ul").html(html);
    })
})